-- GENERATED SPELL FOR [Elder Cloud Serpent] --


function spell0_4119(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(421,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4119', 2000, 1)
end

function spell1_4119(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(8246,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4119', 3500, 1)
end

function Sorts_4119(pUnit, Event)
local choix_sorts_4119 = math.random(0, 1)
if choix_sorts_4119 == 0 then
pUnit:RegisterEvent('spell0_4119', 1, 1)
end
if choix_sorts_4119 == 1 then
pUnit:RegisterEvent('spell1_4119', 1, 1)
end
end

function mob4119_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4119', math.random(1500, 3000), 1)
end

function mob4119_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4119_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4119_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4119, 1, 'mob4119_Action')
RegisterUnitEvent(4119, 2, 'mob4119_Leave')
RegisterUnitEvent(4119, 3, 'mob4119_Kill')
RegisterUnitEvent(4119, 4, 'mob4119_Die')
